#ifndef __WORLD_H__
#define __WORLD_H__
#include <vector>
#include "Command.h"

struct constant_t;
struct flag_t;
struct tank_t;
struct obstacle_t;
struct otank_t;
struct shot_t;
struct team_t;
struct occgrid_t;

class Track;

using std::vector;

class World
{
public:
	static World* instance();
	~World();

	void init();

	Command update();

	vector <constant_t> & constants();
	vector <flag_t> & flags();
	vector <tank_t> & tanks();
	vector <obstacle_t> & obstacles();
	vector <otank_t> & other_tanks();
	vector <shot_t> & shots();
	vector <team_t> & teams();
	vector <occgrid_t> & occgrids();

	vector <constant_t> * constantsP();
	vector <flag_t> * flagsP();
	vector <tank_t> * tanksP();
	vector <obstacle_t> * obstaclesP();
	vector <otank_t> * other_tanksP();
	vector <shot_t> * shotsP();
	vector <team_t> * teamsP();
	vector <occgrid_t> * occgridsP();

	int getSize();
	float getTruePositive();
	float getTrueNegative();

private:
	World();

	static World* _instance;

	vector <constant_t> _constants;
	vector <flag_t> _flags;
	vector <tank_t> _tanks;
	vector <obstacle_t> _obstacles;
	vector <otank_t> _other_tanks;
	vector <shot_t> _shots;
	vector <team_t> _teams;
	vector <occgrid_t> _occgrids;

	int size;
	float truePositive;
	float trueNegative;
};

#endif